/**
 * 
 */
package com.youth.fund.hk.hostManager.manager.dao.mybatis;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.youth.fund.hk.hostManager.common.dao.mybatis.BaseMybatisDao;
import com.youth.fund.hk.hostManager.manager.dao.RecruitmentBenifitDao;
import com.youth.fund.hk.hostManager.manager.datamodel.RecruitmentBenifitModel;

/**
 * @author Sunk_Sky
 *
 * 2014年11月9日下午4:43:50
 */
@Repository("RecruitmentBenifitDao")
public class RecruitmentBenifitMybatisDaoImpl extends
		BaseMybatisDao<RecruitmentBenifitModel, Integer> implements
		RecruitmentBenifitDao
{
	private final static String CREATE = "recruitment_benifit.create";

	private final static String DELETE = "recruitment_benifit.delete";

	private final static String UPDATE = "recruitment_benifit.update";

	private final static String QUERY_BY_CONDITION = "recruitment_benifit.list_by_condition";

	@Override
	public boolean create(RecruitmentBenifitModel model)
	{
		Timestamp timestamp = new Timestamp(System.currentTimeMillis());

		model.setSetup_time(timestamp);

		model.setUpdate_time(timestamp);

		return super.create(model, CREATE);
	}

	@Override
	public boolean delete(RecruitmentBenifitModel model)
	{
		return super.delete(model, DELETE);
	}

	@Override
	public boolean update(RecruitmentBenifitModel model)
	{
		Timestamp timestamp = new Timestamp(System.currentTimeMillis());

		model.setUpdate_time(timestamp);
		
		return super.update(model, UPDATE);
	}

	@Override
	public List<RecruitmentBenifitModel> query(
			RecruitmentBenifitModel model)
	{
		return super.query(model, QUERY_BY_CONDITION);
	}

	/* (non-Javadoc)
	 * @see com.youth.fund.hk.hostManager.common.dao.ICommonDao#queryOne(java.io.Serializable)
	 */
	@Override
	public RecruitmentBenifitModel queryOne(RecruitmentBenifitModel model)
	{
		return super.queryOne(model, QUERY_BY_CONDITION);
	}

}
